package com.evil.common.account.dto.department;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Collection;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DepartmentTreeReqDTO implements Serializable {

    /**
     * 企业ID
     */
    private Long enterpriseId;

    /**
     * 上级部门
     */
    private Long parentDepartmentId;

    /**
     * 关键字模糊搜索
     */
    private String keyword;

    /**
     * 部门IDS
     */
    private Collection<Long> departmentIds;

    public static DepartmentTreeReqDTO filter(Long enterpriseId) {
        return new DepartmentTreeReqDTO(enterpriseId, null, null, null);
    }

    public static DepartmentTreeReqDTO filter(Long enterpriseId, Collection<Long> departmentIds) {
        return new DepartmentTreeReqDTO(enterpriseId, null, null, departmentIds);
    }
}
